package com.vivachek.protocol.converts


/**
 * @Author: YCB
 * @Time: 2022/9/26 18:41
 * @Email: congbin.yuan@vivachek.com
 * @Description: 读取设备的软件版本
 *
 */
private const val COMMAND = 102
private const val EXPAND_CODE = 170
private const val LENGTH = 16
internal class DeviceSoftwareVersionConvert : DataConvert(COMMAND, EXPAND_CODE, LENGTH) {

    override fun parse(data: List<Int>,origin:List<Int>) {
        val result = StringBuilder()
        data.forEach{
            result.append(it.toChar())
        }
        listener?.deviceSoftwareVersion(result.toString())
    }
}